#!
$dirname = "./files";
opendir (MYDIR,$dirname)||die"can not open $dirname:$!";
@files = grep(!/^(\.)|(\..)$/,readdir MYDIR);
print join("\n",@files);
closedir MYDIR;